import os

# 词中查找词是否存在
def find_word(word, keywords):
    for key in keywords:
        if key in word:
            return True
    return False

# 删除文件
def delete_file(file_path):
    try:
        os.remove(file_path)
    except Exception as e:
        raise Exception("删除文件失败: ",e)

# 检测文件是否存在
def is_file_exist(file_path):
    return os.path.exists(file_path)